home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / os2 / etelr21 / getcrncy.vrm < prev    next >
Text File  |  1994-09-04  |  3KB  |  90 lines

  1. /* Custom mainline for macro */
  2.  
  3.     call RXFuncAdd "VRLoadFuncs", "VROBJ", "VRLoadFuncs"
  4.     call VRLoadFuncs
  5.  
  6.     _VREVersion = SubWord( VRVersion( "VRObj" ), 1, 1 )
  7.     if( _VREVersion < 2.10 )then do
  8.         call VRMessage "", "This program requires VX-REXX version 2.1 to run.", "Error!"
  9.         return 32000
  10.     end
  11.  
  12.     signal on SYNTAX name _VRESyntax
  13.     signal _VREMain
  14.  
  15. _VRESyntax:
  16.     parse source . . _VRESourceSpec
  17.     call VRMessage "", "Syntax error in" _VRESourceSpec "line" SIGL":" ErrorText(rc), "Error!"
  18.     exit 32000
  19.  
  20. _VREMain:
  21. /*:VRX         Main
  22. */
  23. Main:
  24. /*****************************************************/
  25. /* Macro for fetching currency settings from os2.ini */
  26. /* Please do not modify                              */
  27. /*****************************************************/
  28. iCurrency = VRGetIni( 'PM_National', 'iCurrency', 'User', 'NoClose' )
  29. iDigits = VRGetIni( 'PM_National', 'iDigits', 'User', 'NoClose' )
  30. iLzero = VRGetIni( 'PM_National', 'iLzero', 'User', 'NoClose' )
  31. sThousand = VRGetIni( 'PM_National', 'sThousand', 'User', 'NoClose' )
  32. sDecimal = VRGetIni( 'PM_National', 'sDecimal', 'User', 'NoClose' )
  33. sCurrency = VRGetIni( 'PM_National', 'sCurrency', 'User' )
  34. if iCurrency = '' then 
  35.     iCurrency = '0'
  36. if iDigits = '' | POS( '0', iDigits ) <> 0 then 
  37.     iDigits = '2'
  38. if( POS( '1', iDigits ) <> 0 )then 
  39.     iDigits = '1'
  40. if( POS( '2', iDigits ) <> 0 )then 
  41.     iDigits = '2'
  42. if( POS( '3', iDigits ) <> 0 )then 
  43.     iDigits = '3'
  44. if iLzero = '' then 
  45.     iLzero = '0'
  46. if sThousand = '' then 
  47.     sThousand = ','
  48. if sDecimal = '' then 
  49.     sDecimal = '.'
  50. if sCurrency = '' then 
  51.     sCurrency = '$'
  52. if POS( "$", sCurrency ) <> 0 then sCurrency = "$"
  53. if POS( "Ö", sCurrency ) <> 0 then sCurrency = "Ö"
  54. if POS( "Kr", sCurrency ) <> 0 then sCurrency = "Kr"
  55. if POS( "\", sCurrency ) <> 0 then sCurrency = "\"
  56. if POS( "NT$", sCurrency ) <> 0 then sCurrency = "NT$"
  57. if POS( "ƒ", sCurrency ) <> 0 then sCurrency = "ƒ"
  58. if POS( "x", sCurrency ) <> 0 then sCurrency = "x"
  59. if POS( "F", sCurrency ) <> 0 then sCurrency = "F"
  60. if POS( "mk", sCurrency ) <> 0 then sCurrency = "mk"
  61. if POS( "Fr", sCurrency ) <> 0 then sCurrency = "Fr"
  62. if POS( "SEK", sCurrency ) <> 0 then sCurrency = "SEK"
  63. if POS( "Kƒs", sCurrency ) <> 0 then sCurrency = "Kƒs"
  64. if POS( "FT", sCurrency ) <> 0 then sCurrency = "FT"
  65. if POS( "╓kr", sCurrency ) <> 0 then sCurrency = "╓kr"
  66. if POS( "Zê", sCurrency ) <> 0 then sCurrency = "Zê"
  67. if POS( "Pts", sCurrency ) <> 0 then sCurrency = "Pts"
  68. if POS( "TL", sCurrency ) <> 0 then sCurrency = "TL"
  69. if POS( "Din", sCurrency ) <> 0 then sCurrency = "Din"
  70. if POS( "Cr$", sCurrency ) <> 0 then sCurrency = "Cr$"
  71. if POS( "£", sCurrency ) <> 0 then sCurrency = "£"
  72. if POS( 'ñ', sCurrency ) <> 0 then sCurrency = 'ñ'
  73. if POS( "DM", sCurrency ) <> 0 then sCurrency = "DM"
  74. if POS( "kr", sCurrency ) <> 0 then sCurrency = "kr"
  75. if POS( "BEF", sCurrency ) <> 0 then sCurrency = "BEF"
  76. if POS( "L.", sCurrency ) <> 0 then sCurrency = "L."
  77. if( POS( "2", iCurrency ) <> 0 )then sCurrency = sCurrency||" "
  78. if( POS( "3", iCurrency ) <> 0 )then sCurrency = " "||sCurrency
  79. currency.0 = 6
  80. currency.1 = iCurrency
  81. currency.2 = iDigits
  82. currency.3 = iLzero 
  83. currency.4 = sThousand
  84. currency.5 = sDecimal
  85. currency.6 = sCurrency
  86. call VRMethod 'Application', 'PutVar', 'currency.'
  87. exit
  88.  
  89.  
  90.